package com.yn.pet.controller.pc.request;

import com.yn.common.utils.bean.BeanUtils;
import com.yn.pet.entity.Pet;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.Data;

import javax.validation.constraints.NotNull;

@Data
public class PetBindRequest {

    @ApiModelProperty("imei")
    @NotNull(message = "imei不能为空")
    private String imei;

    @ApiModelProperty("宠物类型 1-人 2-猫 3-狗")
    private Integer petType;

    @ApiModelProperty("宠物名称")
    private String petName;

    @ApiModelProperty("宠物品质")
    private String breed;

    @ApiModelProperty("宠物性别 0-未知 1-男/公 2-女/母")
    private Integer gender;

    @ApiModelProperty("毛色")
    private String color;

    @ApiModelProperty("头像url")
    private String avatar;

    @ApiModelProperty("描述")
    private String description;

    public static Pet transform(PetBindRequest petRequest){
        Pet pet = new Pet();
        BeanUtils.copyProperties(petRequest, pet);
        return pet;
    }
}
